# -*- coding: utf-8 -*-
__author__ = 'Perry'

from utils import BasePage
from time import sleep
from selenium.webdriver.common.by import By

class Login(BasePage.Base):
	# 用户名输入框
	user_loc = (By.ID, "cc.vv.btong:id/et_al_phone")
	# 密码输入框
	pwd_loc = (By.ID, "cc.vv.btong:id/et_al_password")
	# 登录按钮
	btn_loc = (By.ID, "cc.vv.btong:id/tv_al_login")

	#输入用户名
	def input_user(self, value):
		self.find_element(self.user_loc).send_keys(value)
		sleep(1)

	#输入密码
	def input_pwd(self, value):
		self.find_element(self.pwd_loc).send_keys(value)
		sleep(1)

	#点击登录按钮
	def click_logBtn(self):
		self.find_element(self.btn_loc).click()